//
//  ViewController.m
//  MainProject
//
//  Created by 葱花思鸡蛋 on 2020/7/21.
//  Copyright © 2020 葱花思鸡蛋. All rights reserved.
//

#import "ViewController.h"
#import <ModuleBCategory/CTMediator+ModuleB.h>
#import <ShareUI/CTMediator+ShareUI.h>
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UIButton *ModuleB = [[UIButton alloc] initWithFrame:CGRectMake(50, 50, 100, 100)];
    [ModuleB setTitle:@"ModuleB" forState:UIControlStateNormal];
    ModuleB.backgroundColor = [UIColor lightGrayColor];
    [ModuleB addTarget:self action:@selector(share) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:ModuleB];
    
   
    
    
}
- (void)moduleBAction{
    
    UIViewController *VC = [[CTMediator sharedInstance] ModuleB_viewControllerWithCallback:^(NSString *result) {
        NSLog(@"resultB: --- %@", result);
    }];
    [self.navigationController pushViewController:VC animated:YES];
    
}

- (void)share{
     NSArray* arr=@[@{@"img":@"friend",@"title":@"微信好友"},@{@"img":@"circle",@"title":@"朋友圈"},@{@"img":@"qq",@"title":@"QQ"}];
    NSMutableDictionary *dictM = [NSMutableDictionary dictionary];
    [dictM setValue:arr forKey:@"list"];
    [dictM setValue:@"1" forKey:@"isShow"];
    [[CTMediator sharedInstance] ShareUI_Category:dictM.copy];
    
}

@end
